package com.wish.g01.financial.controller;

import com.wish.g01.base.dto.ContractDto;
import com.wish.g01.base.entity.CfContract;
import com.wish.g01.base.service.ICfContractService;
import com.wish.g01.financial.common.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 合同
 * 这个类的作者是13536
 * 开发日期:2022/5/29
 **/
@RestController
@RequestMapping("/contract")
public class CfContractController {

    @Autowired
    ICfContractService iCfContractService;

    /**
     * 合同的小区名称,租客姓名模糊查询
     * @param contractDto
     * @return
     */
    @GetMapping("getCfContractListByName")
    public AjaxResult getCfContractListByName(ContractDto contractDto){
        List<CfContract> list = iCfContractService.getList(contractDto);
        return AjaxResult.success(list);
    }

}
